package Other;

public class TreeNode {
	private int value;
	private TreeNode left, right;
	
	public TreeNode(int value)
	{
		this.value = value;
		this.right = null;
		this.left = null;
	}
	
	public TreeNode(int value, TreeNode left, TreeNode right)
	{
		this.value = value;
		this.right = right;
		this.left = left;
	}
	
	public TreeNode getLeft()
	{
		return left;
	}
	
	public TreeNode getRight()
	{
		return right;
	}
	
	public int getValue()
	{
		return value;
	}
	
	public void setValue(int value)
	{
		this.value = value;
	}
	
	public void setLeft(TreeNode left)
	{
		this.left = left;
	}
	
	public void setRight(TreeNode right)
	{
		this.right = right;
	}
}
